import Vue from 'vue'
import VueRouter from 'vue-router'
import CampusBinhai from '../views/CampusBinhai.vue'
import CampusChashan from '../views/CampusChashan.vue'
import CampusYueqing from '../views/CampusYueqing.vue'
import StudentSystem from '../views/StudentSystem.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'CampusBinhai',
    component: CampusBinhai
  },
  {
    path: '/chashan',
    name: 'CampusChashan',
    component: CampusChashan,
    children: [
      {
        path: 'five',
        name: 'FiveBuilding',
        component: () => import('@/views/FiveBuilding.vue')
      },
      {
        path: 'six',
        name: 'SixBuilding',
        component: () => import('@/views/SixBuilding.vue')
      },
      {
        path: 'seven',
        name: 'SevenBuilding',
        component: () => import('@/views/SevenBuilding.vue')
      }
    ]
  },
  {
    path: '/yueqing',
    name: 'CampusYueqing',
    component: CampusYueqing
  },
  {
    path: '/student-system',
    name: 'StudentSystem',
    component: StudentSystem
  },
]

const router = new VueRouter({
  routes
})

export default router